<?php

session_start();
if($_SESSION['is_login'] == false){
    header("location: login.php");
}

$user_id = $_SESSION['user_id'];

$message="Subarna, Sujan";
$actions_include_path = "actions";


$front_include_path = "views/frontend/";
$action_path = "actions";

$page = $_GET['page'];
//echo
$sub_page = $_GET['sub_page'];

if ($page =="profile"){
    $content = $front_include_path."profile_view.php";
}
else if ($page =="signup"){
    $content = $front_include_path."signup.php";
}
else if ($page =="terms"){
    $content = $front_include_path."terms_view.php";
}
else if ($page =="message"){
    $content = $front_include_path."message_view.php";
}else if ($page =="forum"){
    $content = $front_include_path."forum_view.php";
}
else if ($page =="comment"){
    $content = $front_include_path."comments_view.php";
}
else if ($page =="chat"){
    $content = $front_include_path."chat_view.php";
}
else if ($page =="about"){
    $content = $front_include_path."about_view.php";
}
    else if ($page=="new_message"){
    $content = $front_include_path."new_message_view.php";
}
else if ($page=="inbox"){
    $content = $front_include_path."message_view.php";
}
else if ($page=="sent"){
    $content = $front_include_path."sent_message_view.php";
}
else if ($page=="draft"){
    $content = $front_include_path."draft_message_view.php";
}
else if ($page=="edit_profile"){
    $content = $front_include_path."edit_profile_view.php";
}
else{
    $content = $front_include_path."home_view.php";
}


?>

<html>
<head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Susudo</title>
<link rel="stylesheet" href="css/frontend/styles.css" type="text/css"  media="screen" />
<script src="js/jquery.js" type="text/javascript"></script>

<script type="text/javascript">

 $(document).ready(function(){
    // alert("Thanks for visiting!");
 });
</script>

    </head>
    <body>
        <div id="header">            
          <?php include $front_include_path."header.php"; ?>
           </div>
        <div id="content_wrapper">
             
               <?php
                include("$content");
                ?>

        <div class="clear"></div>
        </div>
        <div id="footer">
           <?php include $front_include_path."footer.php"; ?>
        </div>
        
    </body>
</html>